package com.lelouch.examplecode.designpattern.adapter;

/**
 * @author lcy
 * @create 2018-10-11 14:34
 */
public class UserAdapter implements UserInterface {
    private UserInfo userInfo;



    public UserAdapter(UserInfo userInfo) {
        this.userInfo = userInfo;
    }

    @Override
    public String getName() {
        return (String) userInfo.getUserInfoMap().get("username");
    }

    @Override
    public String getTelNumber() {
        return (String) userInfo.getUserInfoMap().get("usertelephone");
    }
}
